package com.woniuxy.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.woniuxy.controller.dto.GetHousingMaterialDto;
import com.woniuxy.dao.model.HousingMaterial;
import com.woniuxy.dao.HousingMaterialDao;
import com.woniuxy.service.HousingMaterialService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 维修材料字典表 服务实现类
 * </p>
 *
 * @author Keep it simple
 * @since 2022-06-28
 */
@Service
public class HousingMaterialServiceImpl extends ServiceImpl<HousingMaterialDao, HousingMaterial> implements HousingMaterialService {

    @Resource
    private HousingMaterialDao housingMaterialDao;

    @Override
    public List<HousingMaterial> all() {
        List<HousingMaterial> housingMaterials = housingMaterialDao.selectList(new QueryWrapper<HousingMaterial>());

        return housingMaterials;
    }

    public List<String> getAllMaterialName(){
        return housingMaterialDao.getAllMaterialName();
    }
}
